/*
 * ExplorerPanel.java
 *
 * Created on March 5, 2006, 9:14 PM
 */
package com.bff.mpd.musicjukebox.ui;

import com.bff.mpd.musicjukebox.lib.JukeboxProperties;
import com.bff.bjj.ui.component.BJJPanel;
import org.bff.javampd.MPDDatabase;
import org.bff.javampd.MPDPlaylist;

/**
 *
 * @author  Bill
 */
public class ExplorerPanel extends BJJPanel {

    private MPDDatabase database;
    private MPDPlaylist playlist;
    private ExplorerIface explorer;

    public ExplorerPanel() {
        super();
        this.database = JukeboxProperties.getInstance().getDatabase();
        this.playlist = JukeboxProperties.getInstance().getPlaylist();

        initComponents();

        explorer = (ExplorerIface)explorerListPanel;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        explorerListPanel = new ExplorerListPanel();

        setLayout(new java.awt.BorderLayout());
        add(explorerListPanel, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel explorerListPanel;
    // End of variables declaration//GEN-END:variables
    private ExplorerTreePanel explorerTreePanel;

    public void refreshComponents() {
        explorer.refreshComponents();
    }

    /**
     * @return the database
     */
    public MPDDatabase getDatabase() {
        return database;
    }

    /**
     * @param database the database to set
     */
    public void setDatabase(MPDDatabase database) {
        this.database = database;
    }

    /**
     * @return the playlist
     */
    public MPDPlaylist getPlaylist() {
        return playlist;
    }

    /**
     * @param playlist the playlist to set
     */
    public void setPlaylist(MPDPlaylist playlist) {
        this.playlist = playlist;
    }
}
